﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using Core.Entities;
using Library.Extensions;

namespace Core.Queries
{    
    public class ColumnQuery : BaseQuery<Column>
    {
        public int? ArticleID { get; set; }
 
        public override Expression<Func<Column, bool>> ToExpression()
        {
            Expression<Func<Column, bool>> predicate = x => true;
            if (ArticleID.HasValue)
            {
                predicate = x => x.ArticleID == ArticleID;
            }
            return predicate;
        }
    }
}
